# -*- coding: utf-8 -*-
# def fn(**args):
#     print('args=',args)
# fn(a=1,b=2,c=3)
# fn(1,2,3) 报错，不明确键值

# def fn(a, b, **args, *kwargs):
#     print(a)
#     print(b)
#     print(args)
#     print(kwargs)
#
#
# fn(1, 2, 3, 4, 5, 6, 7, 7, k=3, w=8)

#字典使用双*号
# def fn(a,b,c):
#     print(a)
#     print(b)
#     print(c)
# # t = [1,2,3]
# # f = (4,5,6)
# fn(*t)

# c = null
# def fn():
#     a = 1
#     c = a
#     return a
# fn()
# print(c)


# def fn():
#     def fn2():
#         print('hello')
#     # print('f')
#     return fn2
# f = fn()
# f()

# def fn():
#     pass
# print(fn())
# print(type(None))
#

#
# def sum(*args):
#     result = 0
#     for i in args:
#         result += i
#     return result
# r = sum(1,2,3,4)
# print(r+10)

# 作用域
# def fn():
#     x = 1
# print(fn())


# y = 2
# def fn():
#     x = 1
#     print(x)
#     y = x
#     print(y,'-----')
# print(fn())
# print(x)

